using MaterialSkin.Controls;
using System;
using System.Drawing;
using System.Windows.Forms;

namespace VideoAutoGenerator.UI.UserControls
{
    public partial class ProjectConfigControl : MaterialSkin.Controls.MaterialCard
    {
        public ProjectConfigControl()
        {
            InitializeComponent();
        }

        private void InitializeComponent()
        {
            this.SuspendLayout();
            
            // 
            // ProjectConfigControl
            // 
            this.Name = "ProjectConfigControl";
            this.Size = new System.Drawing.Size(700, 500);
            
            // Create layout panel
            var mainPanel = new MaterialSkin.Controls.MaterialLabel();
            mainPanel.Dock = DockStyle.Fill;
            mainPanel.Padding = new Padding(10);
            
            // Add controls for project configuration
            int top = 10;
            const int labelWidth = 120;
            const int textBoxWidth = 150;
            const int controlHeight = 35;
            const int spacing = 15;
            
            // Image display duration
            MaterialLabel imageDurationLabel = new MaterialLabel();
            imageDurationLabel.Text = "图像显示时长:";
            imageDurationLabel.Location = new Point(10, top);
            imageDurationLabel.Size = new Size(labelWidth, controlHeight);

            MaterialTextBox imageDurationTextBox = new MaterialTextBox();
            imageDurationTextBox.Location = new Point(labelWidth + 20, top);
            imageDurationTextBox.Size = new Size(textBoxWidth, controlHeight);
            
            top += controlHeight + spacing;
            
            // Default audio duration
            MaterialLabel audioDurationLabel = new MaterialLabel();
            audioDurationLabel.Text = "默认音频时长:";
            audioDurationLabel.Location = new Point(10, top);
            audioDurationLabel.Size = new Size(labelWidth, controlHeight);

            MaterialTextBox audioDurationTextBox = new MaterialTextBox();
            audioDurationTextBox.Location = new Point(labelWidth + 20, top);
            audioDurationTextBox.Size = new Size(textBoxWidth, controlHeight);
            
            top += controlHeight + spacing;
            
            // Video width
            MaterialLabel videoWidthLabel = new MaterialLabel();
            videoWidthLabel.Text = "视频宽度:";
            videoWidthLabel.Location = new Point(10, top);
            videoWidthLabel.Size = new Size(labelWidth, controlHeight);

            MaterialTextBox videoWidthTextBox = new MaterialTextBox();
            videoWidthTextBox.Location = new Point(labelWidth + 20, top);
            videoWidthTextBox.Size = new Size(textBoxWidth, controlHeight);
            
            top += controlHeight + spacing;
            
            // Video height
            MaterialLabel videoHeightLabel = new MaterialLabel();
            videoHeightLabel.Text = "视频高度:";
            videoHeightLabel.Location = new Point(10, top);
            videoHeightLabel.Size = new Size(labelWidth, controlHeight);

            MaterialTextBox videoHeightTextBox = new MaterialTextBox();
            videoHeightTextBox.Location = new Point(labelWidth + 20, top);
            videoHeightTextBox.Size = new Size(textBoxWidth, controlHeight);
            
            top += controlHeight + spacing;
            
            // Transition effect
            MaterialLabel transitionLabel = new MaterialLabel();
            transitionLabel.Text = "使用过渡效果:";
            transitionLabel.Location = new Point(10, top);
            transitionLabel.Size = new Size(labelWidth, controlHeight);
            
            MaterialCheckbox transitionCheckBox = new MaterialCheckbox();
            transitionCheckBox.Location = new Point(labelWidth + 20, top);
            transitionCheckBox.Size = new Size(100, controlHeight);
            transitionCheckBox.Checked = true;
            
            // Add all controls to panel
            mainPanel.Controls.Add(imageDurationLabel);
            mainPanel.Controls.Add(imageDurationTextBox);
            mainPanel.Controls.Add(audioDurationLabel);
            mainPanel.Controls.Add(audioDurationTextBox);
            mainPanel.Controls.Add(videoWidthLabel);
            mainPanel.Controls.Add(videoWidthTextBox);
            mainPanel.Controls.Add(videoHeightLabel);
            mainPanel.Controls.Add(videoHeightTextBox);
            mainPanel.Controls.Add(transitionLabel);
            mainPanel.Controls.Add(transitionCheckBox);
            
            // Add panel to control
            this.Controls.Add(mainPanel);
            
            this.ResumeLayout(false);
        }
    }
}